import Vue from 'vue'
import Router from 'vue-router'

//闪屏
import screen from '../components/screen/index.vue'
//登录
import login from '../components/login/index.vue'
//启动
import start from '../components/start/index.vue'
//首页
import shouye from '../components/shouye/index.vue'
//分类
import fenlei from '../components/fenlei/fenlei.vue'
//美妆
import meizhuang from '../components/fenlei/feileiContent/meizhuang.vue'
//上新
import shangxin from '../components/fenlei/feileiContent/shangxin.vue'
//发现
import find from '../components/find/index.vue'
//交流
import jiaoliu from '../components/find/findContent/jiaoliu.vue'
//灵感
import linggan from '../components/find/findContent/linggan.vue'
//联名
import lianMing from '../components/find/findContent/lianMing.vue'
//设计师
import design from '../components/find/findContent/design.vue'
//购物车
import shopCar from '../components/shopCar/index.vue'
//个人中心
import center from '../components/center/center.vue'
//确认订单
import pay from '../components/center/content/pay.vue'
//查看全部
import lookall from '../components/center/content/lookall.vue'
//商品详情
import details from '../components/details/index.vue'
//无信号
import noSignal from '../view/noSignal/index.vue'
//评价 
import comment from '../view/Comment/index.vue'
Vue.use(Router)

export default new Router({
	routes: [

		//闪屏
		{
			path: "/screen",
			name: "screen",
			component: screen,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
		//登录
		{
			path: "/login",
			name: "login",
			component: login,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
		//首页
		{
			path: "/shouye",
			name: "shouye",
			component: shouye,
			meta: {
				keepAlive: true //导航栏在该页面显示
			}
		},
		// 分类
		{
			path: "/fenlei",
			name: "fenlei",
			component: fenlei,
			redirect: "/fenlei/meizhuang",
			children: [
				//美妆
				{
					path: "meizhuang",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				//上新
				{
					path: "shangxin",
					name: "shangxin",
					component: shangxin,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "chuban",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "wenhua",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "xiangfen",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "shoushi",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "tongqi",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "taochi",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "shichou",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				{
					path: "jiaju",
					name: "meizhuang",
					component: meizhuang,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
			]
		},

		

		//发现
		{
			path: "/find",
			name: "find",
			component: find,
			redirect: "/find/jiaoliu",
			// meta: {
			// 	keepAlive: true //导航栏在该页面显示
			// },
			children: [
				//交流
				{
					path: "jiaoliu",
					name: "jiaoliu",
					component: jiaoliu,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				//灵感
				{
					path: "linggan",
					name: "linggan",
					component: linggan,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				//联名
				{
					path: "lianMing",
					name: "lianMing",
					component: lianMing,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
				//设计
				{
					path: "design",
					name: "design",
					component: design,
					meta: {
						keepAlive: true //导航栏在该页面显示
					}
				},
			]
		},





		//购物车
		{
			path: "/shopCar",
			name: "shopCar",
			component: shopCar,
			meta: {
				keepAlive: true //导航栏在该页面显示
			}
		},
		//个人中心
		{
			path: "/center",
			name: "center",
			component: center,
			meta: {
				keepAlive: true //导航栏在该页面显示
			}
		},
		//确认付款
		{
			path: "/pay",
			name: "pay",
			component: pay,
			meta: {
				keepAlive: true //导航栏在该页面显示
			}
		},
		//查看全部
		{
			path: "/lookall",
			name: "lookall",
			component: lookall,
			meta: {
				keepAlive: true //导航栏在该页面显示

			}
		},
		//商品详情
		{
			path: "/details",
			name: "details",
			component: details,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
		//无信号
		{
			path: "/noSignal",
			name: "noSignal",
			component: noSignal,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
		//评论
		{
			path: "/comment",
			name: "comment",
			component: comment,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
		//启动
		{
			path: "/",
			name: "start",
			component: start,
			meta: {
				keepAlive: false //导航栏在该页面显示
			}
		},
	]

})
